package cn.com.bdqn.service.impl;

import cn.com.bdqn.dao.OrdersDao;
import cn.com.bdqn.entity.Orders;
import cn.com.bdqn.service.OrdersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class OrdersServiceImpl implements OrdersService {

    @Autowired
    private OrdersDao dao;

    @Override
    public List<Orders> queryByOdrCustomer(String odrCustomer) {
        return dao.queryByOdrCustomer(odrCustomer);
    }

    @Override
    public Orders queryByOdrCode(String odrCode) {
        return dao.queryByOdrCode(odrCode);
    }

    @Override
    public Date queryRecentDate(String custNo) {
        return dao.queryByOdrCode(custNo).getOdrDate();
    }
}
